﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="newslist.aspx.cs" Inherits="admin_newslist" %>

<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 80px;
        }
        .style2
        {
            width: 80px;
        }
        .style3
        {
            width: 350px;
        }
        .style4
        {
            width: 140px;
        }
        .table2{border:#ffffff solid;border-width:1 0 0 1;}
        
        .td{border:#ffffff solid;border-width:0 1 1 0}
    </style>
    <script language="javascript" type="text/javascript">

        function QR() {

            return confirm("确认吗？");
        }
    
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="text-align:center;">
        <tr>
        <td class="style1">类型</td>
        <td class="style1">编号</td>
        <td class="style2">发布者</td>
        <td class="style3">新闻标题</td>
        <td class="style4">发表时间</td>
        </tr>
        </table>
        <asp:Repeater ID="rptnewslist" runat="server" 
            onitemcommand="rptnewslist_ItemCommand">
        <ItemTemplate>
        <table border="1px" cellpadding ="0"  cellspacing="0" class="table2" >
        <tr>
        <td class="style1"><%#Eval("tname")%></td>
        <td class="style1"><%#Eval("nid")%></td>
        <td class="style2"><%#Eval("naddname")%></td>
        <td class="style3"><%#Eval("nsubject")%></td>
        <td class="style4"><%#Eval("ndate") %></td>
        <td><asp:ImageButton ID="btndel" runat="server" ImageUrl="~/img/del.png" CommandName="del" CommandArgument='<%#Eval("nid")%>' OnClientClick="return QR()" /></td>
        <td><asp:ImageButton ImageUrl="~/img/edit.png" ID="btne" runat="server" Text="编辑" CommandName="e" CommandArgument='<%#Eval("nid")%>' />&nbsp;</td>
        </tr>
        </table>
        </ItemTemplate>
        </asp:Repeater>
    </div>
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" 
        FirstPageText="第一页" LastPageText="最后一页" NextPageText="下一页" 
        onpagechanged="AspNetPager1_PageChanged" PagingButtonLayoutType="Span" 
        PrevPageText="上一页" ScrollBars="Auto" ShowPageIndex="False" 
        ShowPageIndexBox="Always" PageSize="18">
    </webdiyer:AspNetPager>
    </form>
</body>
</html>
